<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background: url(imgs/a.jpg) no-repeat;
            background-size: 100% auto;
            /* 设置背景图不随滚动条滚动 默认是滚动的 */
            background-attachment: fixed;
        }
    </style>
</head>

<body>
    <div style="height: 3000px;">
        asdfadsfasdf
    </div>
</body>

</html>